import unittest
from  fileLister import AbstractFileLister

class MockFileLister(AbstractFileLister):
    def listFiles(self, dir):
        if not dir[-1] == "/":
                dir += "/"
            
        files = ["images.0001.dpx", "XYZ.0001.dpx", "images.0010.dpx" ]
        filesWithDir = []
        
        for file in files:
            filesWithDir.append(dir + file)    
            
        return filesWithDir

    

class MockFileListerTests(unittest.TestCase):
    def testListFiles(self):
        fl = MockFileLister()
        files = fl.listFiles("/tmp")
        
        self.assertEquals(list, files.__class__)
        
        for file in files:
            self.assertTrue(file.startswith("/tmp/"))
        

if __name__ == '__main__':
    unittest.main()

